package net.xo68.destiny.core.rocksdb;

import net.xo68.destiny.core.util.Bits;

public class LongRocksSerializer implements RocksSerializer<Long>{

    @Override
    public byte[] serialize(Long l) throws RocksSerializationException {
        final byte[] ks = new byte[8];
        Bits.putLong(ks, 0, l);
        return ks;
    }

    @Override
    public Long deserialize(byte[] bytes) {
        return Bits.getLong(bytes,0);
    }
}
